<template>
	<view class="main">
		<!-- 导航栏 -->
		<u-navbar :background="background" style="z-index: 9999;">
			<view class="ft_16 fw-b">
				物流信息
			</view>
		</u-navbar>
		<!-- 详情 -->
		<scroll-view scroll-y="true" :style="{height:windowHeight+'px'}">
			<view class="">
				<logistics :wlInfo="wlInfo"></logistics>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	// 引入辅助函数
	import logistics from "./components/xinyu-logistics/xinyu-logistics.vue" //物流组件
	export default {
		components:{
			logistics
		},
		data() {
			return {
				background:{backgroundColor: '#ffffff',},
				orderid:"", //订单id
				wlInfo:"", //物流信息
				
				number_kd:"", //快递单号
				phone_kd:"", //收货手机号
				type_kd:"", //快递类型
			}
		},
		onLoad(option) {
			if(option.orderid){
				this.orderid=option.orderid
				this.see_wl()  //查看物流
			}
			console.log(option)
			// this.number_kd=option.number_kd
			// this.phone_kd=option.phone_kd
			// this.type_kd=option.type_kd
		},
		methods: {
			back(){
				uni.navigateBack({
					delta:1
				})
			},
			
			see_wl(){ //查看物流
				this.$myRequest('order/order_logistics',{ //4315801258406
					id:this.orderid
				}).then(res=>{
					console.log(res.data)
					this.wlInfo=res.data.data
				})
			},
		},
		
		computed:{
			// ...mapState(['windowHeight','statusBarHeight','screenHeight'])
		},
	}
</script>

<style lang="scss">
	/* 弹性布局 */
	.display{
		display: flex;
	}
	.juzhong{
		justify-content: center;
		align-items: center;
	}
	.duiqi{
		justify-content: space-between;
		align-items: center;
	}

	.main{
		background-color: #f4f4f4;
		
	}
	
	.navbar{  //导航栏
		width: 100%;
		height: 128rpx;
		background-image: linear-gradient(to right, #ffde4c , #fbcd00);
		padding-top: 40rpx;
		
		.fanhui{
			position: absolute;
			left: 20rpx;
		}
		.title{  
			font-size: 34rpx;color: #333333;font-weight: 700;
		}
	}
	
	
</style>
